package com.f.manage.并发;

import java.util.concurrent.ConcurrentLinkedQueue;

public class ConcurrentLinkedQueueTest {

    public static void main(String[] args) {
        ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue();
        queue.offer("哈哈哈");
        System.out.println("offer后，队列是否空？" + queue.isEmpty());
        System.out.println("从队列中poll：" + queue.poll());
        System.out.println("pool后，队列是否空？" + queue.isEmpty());
        ConcurrentLinkedQueue queue2 = new ConcurrentLinkedQueue();
        queue2.add(12);
        queue2.add(13);
        queue2.add(14);
        queue2.poll();
        System.out.println("--pool后，队列是否空？" + queue.isEmpty());
    }



}
